import React, { memo } from "react";
import { UserinfoWrap } from "./sytle";
import { NavLink } from "react-router-dom";

export default memo(function UserInfoCop(props) {
  return (
    <UserinfoWrap>
      <ul className="f-cb">
        <li>
          <NavLink
            to={{
              pathname: "/user/event",
              search: "?id=" + props.userID,
            }}
          >
            <em>
              {props.myInfo.code === 200 ? props.myInfo.profile.eventCount : ""}
            </em>
            <i>动态</i>
          </NavLink>
        </li>
        <li>
          <NavLink
            to={{
              pathname: "/user/follows",
              search: "?id=" + props.userID,
            }}
          >
            <em>
              {props.myInfo.code === 200 ? props.myInfo.profile.follows : ""}
            </em>
            <i>关注</i>
          </NavLink>
        </li>
        <li>
          <NavLink
            to={{
              pathname: "/user/fans",
              search: "?id=" + props.userID,
            }}
          >
            <em>
              {props.myInfo.code === 200 ? props.myInfo.profile.followeds : ""}
            </em>
            <i>粉丝</i>
          </NavLink>
        </li>
      </ul>
    </UserinfoWrap>
  );
});
